package com.woniuxy.microwalletserver.dao;

import com.woniuxy.bean.BillBean;
import com.woniuxy.microwalletserver.bean.SearchBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * @author: masterhai
 * @date: 2021/4/14:20:06
 * @description:
 */
@Mapper
public interface BillDao {

    List<BillBean> selectNewOrder (@Param("b") BillBean billBean);

    @Insert(" INSERT INTO bill(member_name, create_time, modified_time, order_number, transaction_number, modified_price," +
            " product_type, product_id, order_type, share, product_name, coupon_id,coupon_name,coupon_value,pay_type,transactionFee)" +
            " VALUES (#{memberName}, #{createTime}, #{modifiedTime}, #{orderNumber}, #{transactionNumber}," +
            "  #{modifiedPrice}, #{productType}, #{productId}, #{orderType}, #{share}, #{productName}, #{couponId},#{couponName},#{couponValue},#{payType},#{transactionFee})")
    int insertBillData (BillBean billBean);


    List<SearchBean> getEarnings (@Param("type")String type,@Param("begin") String begin,@Param("end") String end);
}
